fix(ui): implement orientation adaptive design audit recommendations#1141
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughUpdated table and dropdown viewport layouts, UtilityDrawer initialization, Sheet focus retry and cleanup behavior, related UI tests, and branch review ledger records. ChangesUI behavior updates
Review ledger maintenance
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant UtilityDrawer
participant Sheet
participant FocusTarget
UtilityDrawer->>Sheet: initialize sheet mode from breakpoint
Sheet->>FocusTarget: resolve and focus eligible target
Sheet->>Sheet: retry focus while document focus remains on body
Sheet->>FocusTarget: restore focus on close
Sheet->>Sheet: clear retry interval on close or unmount
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02ce93edf7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02ce93edf7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
GraphQL review-thread replies returned 403; resolved the fixed duplicate-height threads directly after validation. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
# Conflicts: # docs/branch-review-ledger.md Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
@cursoragent Fix merge conflicts |
|
Merge conflicts on PR #1141 are resolved.
|
…mendations-fix Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04d07f21ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0b988ad03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…mendations-fix Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The Sources opener retry must not reclaim focus when another dialog already became active (mobile Guide opened from the Clinical Guide menu). Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Default UtilityDrawer sheet mode for breakpoint=all and retry sheet autofocus so the Find-a-document field keeps focus after drawer mount races.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/ui/sheet.tsx`:
- Around line 211-241: Update the focus restoration flow around focusIfNeeded
and its retryTimer to check isTopmostSheet(sheetId) before attempting focus. If
this Sheet is no longer topmost, clear the retry interval and reset
restoreTimers.openFocusRetry so a lower Sheet cannot reclaim focus from the
newer stacked Sheet.
In `@tests/ui-smoke.spec.ts`:
- Around line 3123-3134: Update the focus-restoration assertion around
openSourcesButton to poll only whether it is the current document.activeElement.
Remove the fallback focus call so the test observes production behavior without
repairing focus during the assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f96073f3-62b2-49e6-a2d3-b22beaaf91ba
📒 Files selected for processing (9)
docs/branch-review-ledger.mdsrc/components/AccessibleTable.tsxsrc/components/clinical-dashboard/dashboard-shell.tsxsrc/components/clinical-dashboard/universal-search-command-surface.tsxsrc/components/ui/sheet.tsxsrc/components/universal-search-command-mockups.tsxtests/clinical-dashboard-merge-artifacts.test.tstests/search-command-surface.test.tstests/ui-smoke.spec.ts
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Gate Sheet autofocus retries on isTopmostSheet, and remove test-side focus repair so production restore failures stay visible.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |


Summary - Fix cross-mode search performance findings: prescribing catalogue debounce/abort/
fields=index, differentials abort/debounce, universal documents typeahead soft-timeout (750ms), shared(search-app)shell to avoid composer remount, and Answer rate-limit in-memory fallback outside production. - Fix Bugbot regressions: shared-shell pathname navigation (/services→/dsm) syncssearchModeduring render (no stale-mode paint) even when the query string is unchanged; extracted ClinicalDashboard lazy imports to stay under the maintainability budget. RAG impact: no retrieval behaviour change — typeahead documents domain timeout and shell URL sync only; ranking formulas and full/api/searchretrieval path unchanged. ## Verification - [x]npm run verify:pr-local— focused Vitest on touched sources (362) plus api-rate-limit / search-shell / universal / route / site-map suites green;docs:check-indexOK - [x] UI verification not run: fullverify:uinot required for this pass; mode-home smoke vianpm run ensurereturned HTTP 200 for/,/services,/dsm,/documents/search,/therapy-compass,/?mode=prescribing, and/api/answer/streamreturned 200 after the rate-limit fallback fix - Verification not run:eval:retrieval:latency/ soak / live OpenAI canary — approval-gated provider work; not needed for timeout-only typeahead change ## Risk and rollout - Risk: medium — shared layout remount change and rate-limit fallback behaviour in non-production; production Answer/upload still fail closed when the durable limiter is unavailable - Rollback: revert this PR; mode routes return to per-segmentGlobalSearchShelllayouts and prior timeout/fallback behaviour - Provider or production effects: None ## Clinical Governance Preflight - [x] Source-backed claims still require linked source verification before clinical use - [x] No patient-identifiable document workflow was introduced or expanded without explicit governance approval - [x] Supabase target remains[REDACTED]([REDACTED]) - [x] Service-role keys and private document access remain server-only - [x] Demo/synthetic content remains clearly separated from real clinical sources - [x] Source metadata, review status, and outdated/unknown-source behavior remain conservative - [x] Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed ## Notes - Prescribing list rows keep the full catalogue payload so Safety/Monitoring filters and patient alerts still see section-derived signals; keystroke storms are controlled by debounce + abort.fields=indexremains for identity-only consumers (cross-mode links). - Live hybrid RPC cold tails remain a separate approval-gated follow-up. ## Summary by CodeRabbit - Bug Fixes - Improved focus handling when opening and closing dialogs, including more reliable focus restoration. - Prevented conflicting sheet height styles when custom maximum-height settings are provided. - Improved expanded table layouts and fullscreen rendering. - Adjusted search dropdown sizing to show more results across viewport sizes. - Improved dashboard drawer behavior at supported breakpoints. - Tests - Added coverage for search dropdown sizing and dashboard layout safeguards. - Strengthened UI checks for asynchronous keyboard navigation and focus restoration. - Documentation - Updated review and merge-readiness tracking records.